﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Demo.Util
{
    public partial class DelayInvokerDemo : Form
    {
        public DelayInvokerDemo()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            Cocon90.Lib.Util.DelayInvoker.CreateInstence(5000).Invoke(() =>
            {
                button1.Enabled = true;
                MessageBox.Show("好了，时间到！！！");

            });
        }
    }
}
